<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/LodopFuncs.js"></script>
</head>
<body>
    <a href="javascript:mySetup()">打印维护</a>
    <a href="javascript:;" onclick="javascript:myAddHtml();LODOP.PRINT_DESIGN();">打印设计</a>
    <a href="javascript:myPreview()"><b>打印预览</b></a>
<table>
    <tr>
        <td>
            <textarea rows="15" id="textarea01" cols="80">
                <table border="1" width="360" height="220" style="border-collapse:collapse;border:solid 1px" bordercolor="#000000">
                  <tr>
                    <td width="100%" height="240">
                      <p align="center"> 
                      <font face="隶书" size="5" style="letter-spacing: 10px">郭德强</font>
                      <p align="center"><font face="宋体" size="3">科学家</font></p>
                      <p align="left"><font face="宋体" size="3">　地址：中国北京社会科学院附近东大街西胡同</font></p>
                      <p align="left"><font face="宋体" size="3">　电话：010-88811888</font></p>
                      <p><br>      　
                      </p>
                    </td>
                  </tr>
                </table>
                </textarea>  
        </td>
    </tr>
</table>
        
</body>
<script type="text/javascript">
    var LODOP ;
    function mySetup() {		       
		CreatePrintPage();       
		LODOP.PRINT_SETUP();		       
    };	
    function myDesign() {		       
		CreatePrintPage();       
		LODOP.PRINT_DESIGN();		       
	};	   
    function CreatePrintPage() {       
		LODOP=getLodop();         
		LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_名片");       
		LODOP.ADD_PRINT_RECT(10,55,360,220,0,1);       
		LODOP.SET_PRINT_STYLE("FontSize",11);       
		LODOP.ADD_PRINT_TEXT(20,180,100,25,"郭德强");       
		LODOP.SET_PRINT_STYLEA(2,"FontName","隶书");       
		LODOP.SET_PRINT_STYLEA(2,"FontSize",15);		       
		LODOP.ADD_PRINT_TEXT(53,187,75,20,"科学家");       
		LODOP.ADD_PRINT_TEXT(100,131,272,20,"地址：中国北京社会科学院附近东大街西胡同");       
		LODOP.ADD_PRINT_TEXT(138,132,166,20,"电话：010-88811888");	       
    };   
    
    function myAddHtml() {       
		LODOP=getLodop();         
   		LODOP.PRINT_INIT("");		            
		LODOP.ADD_PRINT_HTM(10,55,"100%","100%",document.getElementById("textarea01").value);	       
    };
    
    function myPreview() {		       
		CreatePrintPage();       
		LODOP.PREVIEW();		       
	};	
</script>
</html>